package com.yuan.spring.reflect.cglib;

import org.junit.Test;
import org.springframework.cglib.proxy.Enhancer;

/**
 * @author yuaneg 2019/1/8
 */
public class ProxyTest {

    @Test
    public void aaa() {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(AA.class);
        enhancer.setCallback(new BB());
        AA aa = (AA) enhancer.create();
        aa.b();
    }
}
